<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BadgerDB: badgerdb::PageIterator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BadgerDB
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacebadgerdb.html">badgerdb</a></li><li class="navelem"><a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classbadgerdb_1_1_page_iterator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">badgerdb::PageIterator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Iterator for iterating over the records in a page.  
 <a href="classbadgerdb_1_1_page_iterator.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a612d51abd634209c03d672f1328bbc62"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#a612d51abd634209c03d672f1328bbc62">PageIterator</a> ()</td></tr>
<tr class="separator:a612d51abd634209c03d672f1328bbc62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53cb54740042b01a78a0b033d8309d4a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#a53cb54740042b01a78a0b033d8309d4a">PageIterator</a> (<a class="el" href="classbadgerdb_1_1_page.html">Page</a> *page)</td></tr>
<tr class="separator:a53cb54740042b01a78a0b033d8309d4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad376a4999169f299874aa85252bca71b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#ad376a4999169f299874aa85252bca71b">PageIterator</a> (<a class="el" href="classbadgerdb_1_1_page.html">Page</a> *page, const <a class="el" href="structbadgerdb_1_1_record_id.html">RecordId</a> &amp;record_id)</td></tr>
<tr class="separator:ad376a4999169f299874aa85252bca71b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e63f3eea97170b2c566d1549a2215f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#a2e63f3eea97170b2c566d1549a2215f0">operator++</a> ()</td></tr>
<tr class="separator:a2e63f3eea97170b2c566d1549a2215f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a194774a9a788030f70b166e8c16b11ed"><td class="memItemLeft" align="right" valign="top"><a id="a194774a9a788030f70b166e8c16b11ed"></a>
<a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator++</b> (int)</td></tr>
<tr class="separator:a194774a9a788030f70b166e8c16b11ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e8953467bb28cf27eff09f9cdc0a16f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#a1e8953467bb28cf27eff09f9cdc0a16f">operator==</a> (const <a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a> &amp;rhs) const</td></tr>
<tr class="separator:a1e8953467bb28cf27eff09f9cdc0a16f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe98d0b787d4a18af1bc1c573976e394"><td class="memItemLeft" align="right" valign="top"><a id="abe98d0b787d4a18af1bc1c573976e394"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a> &amp;rhs) const</td></tr>
<tr class="separator:abe98d0b787d4a18af1bc1c573976e394"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93b1d76b44cdd2a24cd9ed9f1904dafc"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#a93b1d76b44cdd2a24cd9ed9f1904dafc">operator*</a> () const</td></tr>
<tr class="separator:a93b1d76b44cdd2a24cd9ed9f1904dafc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9433759a0a85c4f362a0ef2d511d7014"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_page_iterator.html#a9433759a0a85c4f362a0ef2d511d7014">getNextUsedSlot</a> (const <a class="el" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> start) const</td></tr>
<tr class="separator:a9433759a0a85c4f362a0ef2d511d7014"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Iterator for iterating over the records in a page. </p>
<p>This class provides a forward-only iterator that iterates over all the records stored in a <a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a>. </p>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00023">23</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a612d51abd634209c03d672f1328bbc62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a612d51abd634209c03d672f1328bbc62">&#9670;&nbsp;</a></span>PageIterator() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">badgerdb::PageIterator::PageIterator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructs an empty iterator. </p>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00028">28</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      : page_(NULL) {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    current_record_ = {<a class="code" href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">Page::INVALID_NUMBER</a>, <a class="code" href="classbadgerdb_1_1_page.html#a4013fab43df72bc52931241575736353">Page::INVALID_SLOT</a>};</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a53cb54740042b01a78a0b033d8309d4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53cb54740042b01a78a0b033d8309d4a">&#9670;&nbsp;</a></span>PageIterator() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">badgerdb::PageIterator::PageIterator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&#160;</td>
          <td class="paramname"><em>page</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructors an iterator over the records in the given page, starting at the first record. <a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> must not be null.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">page</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> to iterate over. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00039">39</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      : page_(page)  {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    assert(page_ != NULL);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> used_slot = <a class="code" href="classbadgerdb_1_1_page_iterator.html#a9433759a0a85c4f362a0ef2d511d7014">getNextUsedSlot</a>(<a class="code" href="classbadgerdb_1_1_page.html#a4013fab43df72bc52931241575736353">Page::INVALID_SLOT</a> <span class="comment">/* start */</span>);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    current_record_ = {page_-&gt;<a class="code" href="classbadgerdb_1_1_page.html#af8416fd0be779f473c97b47e797e1c53">page_number</a>(), used_slot};</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ad376a4999169f299874aa85252bca71b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad376a4999169f299874aa85252bca71b">&#9670;&nbsp;</a></span>PageIterator() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">badgerdb::PageIterator::PageIterator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbadgerdb_1_1_page.html">Page</a> *&#160;</td>
          <td class="paramname"><em>page</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structbadgerdb_1_1_record_id.html">RecordId</a> &amp;&#160;</td>
          <td class="paramname"><em>record_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructs an iterator over the records in the given page, starting at the given record.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">page</td><td><a class="el" href="classbadgerdb_1_1_page.html" title="Class which represents a fixed-size database page containing records.">Page</a> to iterate over. </td></tr>
    <tr><td class="paramname">record_id</td><td>ID of record to start iterator at. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00053">53</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      : page_(page),</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        current_record_(record_id) {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9433759a0a85c4f362a0ef2d511d7014"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9433759a0a85c4f362a0ef2d511d7014">&#9670;&nbsp;</a></span>getNextUsedSlot()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> badgerdb::PageIterator::getNextUsedSlot </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a>&#160;</td>
          <td class="paramname"><em>start</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the next used slot in the page after the given slot or <a class="el" href="classbadgerdb_1_1_page.html#a4013fab43df72bc52931241575736353">Page::INVALID_SLOT</a> if no slots are used after the given slot.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">start</td><td>Slot to start search at. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Next used slot after given slot or <a class="el" href="classbadgerdb_1_1_page.html#a4013fab43df72bc52931241575736353">Page::INVALID_SLOT</a>. </dd></dl>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00111">111</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                                                   {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> slot_number = <a class="code" href="classbadgerdb_1_1_page.html#a4013fab43df72bc52931241575736353">Page::INVALID_SLOT</a>;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keywordflow">for</span> (<a class="code" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> i = start + 1; i &lt;= page_-&gt;header_.<a class="code" href="structbadgerdb_1_1_page_header.html#a6c233369c611cfb617ba676e11a9d87d">num_slots</a>; ++i) {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      <span class="keyword">const</span> PageSlot* slot = page_-&gt;getSlot(i);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;      <span class="keywordflow">if</span> (slot-&gt;used) {</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        slot_number = i;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;      }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    }</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">return</span> slot_number;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a93b1d76b44cdd2a24cd9ed9f1904dafc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93b1d76b44cdd2a24cd9ed9f1904dafc">&#9670;&nbsp;</a></span>operator*()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string badgerdb::PageIterator::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Dereferences the iterator, returning a copy of the current record in the page.</p>
<dl class="section return"><dt>Returns</dt><dd>Record in page. </dd></dl>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00100">100</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                                     {</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">return</span> page_-&gt;<a class="code" href="classbadgerdb_1_1_page.html#aad81fa59b469866fbd260c8a640b579f">getRecord</a>(current_record_); </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a2e63f3eea97170b2c566d1549a2215f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e63f3eea97170b2c566d1549a2215f0">&#9670;&nbsp;</a></span>operator++()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a>&amp; badgerdb::PageIterator::operator++ </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Advances the iterator to the next record in the page. </p>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00061">61</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                                    {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    assert(page_ != NULL);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> used_slot = <a class="code" href="classbadgerdb_1_1_page_iterator.html#a9433759a0a85c4f362a0ef2d511d7014">getNextUsedSlot</a>(current_record_.<a class="code" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">slot_number</a>);</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    current_record_ = {page_-&gt;<a class="code" href="classbadgerdb_1_1_page.html#af8416fd0be779f473c97b47e797e1c53">page_number</a>(), used_slot};</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a1e8953467bb28cf27eff09f9cdc0a16f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e8953467bb28cf27eff09f9cdc0a16f">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool badgerdb::PageIterator::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbadgerdb_1_1_page_iterator.html">PageIterator</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns true if this iterator is equal to the given iterator.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td>Iterator to compare against. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if other iterator is equal to this one. </dd></dl>

<p class="definition">Definition at line <a class="el" href="page__iterator_8h_source.html#l00084">84</a> of file <a class="el" href="page__iterator_8h_source.html">page_iterator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                                                        {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordflow">return</span> page_-&gt;<a class="code" href="classbadgerdb_1_1_page.html#af8416fd0be779f473c97b47e797e1c53">page_number</a>() == rhs.page_-&gt;page_number() &amp;&amp;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        current_record_ == rhs.current_record_;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/ubuntu/study/dbmslab/lab2/BufMgr/src/<a class="el" href="page__iterator_8h_source.html">page_iterator.h</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="aclassbadgerdb_1_1_page_html_a785a1e756d47fb7f8f3603a3fe8ffcef"><div class="ttname"><a href="classbadgerdb_1_1_page.html#a785a1e756d47fb7f8f3603a3fe8ffcef">badgerdb::Page::INVALID_NUMBER</a></div><div class="ttdeci">static const PageId INVALID_NUMBER</div><div class="ttdef"><b>Definition:</b> <a href="page_8h_source.html#l00123">page.h:123</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_record_id_html_a19ec7b749099499446fdd24d48cec9ef"><div class="ttname"><a href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">badgerdb::RecordId::slot_number</a></div><div class="ttdeci">SlotId slot_number</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00039">types.h:39</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_page_iterator_html_a9433759a0a85c4f362a0ef2d511d7014"><div class="ttname"><a href="classbadgerdb_1_1_page_iterator.html#a9433759a0a85c4f362a0ef2d511d7014">badgerdb::PageIterator::getNextUsedSlot</a></div><div class="ttdeci">SlotId getNextUsedSlot(const SlotId start) const</div><div class="ttdef"><b>Definition:</b> <a href="page__iterator_8h_source.html#l00111">page_iterator.h:111</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_page_header_html_a6c233369c611cfb617ba676e11a9d87d"><div class="ttname"><a href="structbadgerdb_1_1_page_header.html#a6c233369c611cfb617ba676e11a9d87d">badgerdb::PageHeader::num_slots</a></div><div class="ttdeci">SlotId num_slots</div><div class="ttdef"><b>Definition:</b> <a href="page_8h_source.html#l00043">page.h:43</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_page_html_af8416fd0be779f473c97b47e797e1c53"><div class="ttname"><a href="classbadgerdb_1_1_page.html#af8416fd0be779f473c97b47e797e1c53">badgerdb::Page::page_number</a></div><div class="ttdeci">PageId page_number() const</div><div class="ttdef"><b>Definition:</b> <a href="page_8h_source.html#l00193">page.h:193</a></div></div>
<div class="ttc" id="anamespacebadgerdb_html_afe9f2f985e7c67e04f76a16f7c4500c8"><div class="ttname"><a href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">badgerdb::SlotId</a></div><div class="ttdeci">std::uint16_t SlotId</div><div class="ttdoc">Identifier for a slot in a page.</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00020">types.h:20</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_page_html_aad81fa59b469866fbd260c8a640b579f"><div class="ttname"><a href="classbadgerdb_1_1_page.html#aad81fa59b469866fbd260c8a640b579f">badgerdb::Page::getRecord</a></div><div class="ttdeci">std::string getRecord(const RecordId &amp;record_id) const</div><div class="ttdef"><b>Definition:</b> <a href="page_8cpp_source.html#l00043">page.cpp:43</a></div></div>
<div class="ttc" id="aclassbadgerdb_1_1_page_html_a4013fab43df72bc52931241575736353"><div class="ttname"><a href="classbadgerdb_1_1_page.html#a4013fab43df72bc52931241575736353">badgerdb::Page::INVALID_SLOT</a></div><div class="ttdeci">static const SlotId INVALID_SLOT</div><div class="ttdef"><b>Definition:</b> <a href="page_8h_source.html#l00128">page.h:128</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
